from PyQt4.QtCore import pyqtSignal, QPoint
from PyQt4.QtGui import QLabel


class QClickLabel(QLabel):

    clicked = pyqtSignal(QPoint, name='clicked(QPoint)')

    def __init(self, parent):
        super(QLabel, self).__init__(parent)

    def mouseReleaseEvent(self, e):
        if(self.contentsRect().contains(e.pos())):
            self.clicked.emit(e.globalPos())
